package com.quwan.common.form;

import cn.jpush.api.push.model.Platform;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import javax.validation.constraints.NotNull;
import java.util.Map;

/**
 * @author lt
 * @Date 2021/12/7 6:03 下午
 */
@ApiModel("极光推送form")
public class JpushForm {
    @ApiModelProperty(value = "别名")
    private String alias;
    @ApiModelProperty(value = "通知标题")
    private String notificationTitle;
    @ApiModelProperty(value = "内容标题")
    private String msgTitle;
    @ApiModelProperty(value = "内容")
    private String msgContent;
    @ApiModelProperty(value = "透传消息附加字段")
    private Map<String, String> extrasParams;
    @ApiModelProperty(value = "平台")
    private Platform platform;
    @ApiModelProperty(value = "推送环境")
    private Byte environment;

    @NotNull
    public JpushForm(String alias, String notificationTitle, String msgTitle, String msgContent, Map<String, String> extrasParams, Platform platform, Byte environment) {
        this.alias = alias;
        this.notificationTitle = notificationTitle;
        this.msgTitle = msgTitle;
        this.msgContent = msgContent;
        this.extrasParams = extrasParams;
        this.platform = platform;
        this.environment = environment;
    }

    /**
     * 推送所有用户form
     */
    @NotNull
    public JpushForm(String notificationTitle, String msgTitle, String msgContent, Map<String, String> extrasParams, Byte environment) {
        this.notificationTitle = notificationTitle;
        this.msgTitle = msgTitle;
        this.msgContent = msgContent;
        this.extrasParams = extrasParams;
        this.environment = environment;
    }

    public String getAlias() {
        return alias;
    }

    public String getNotificationTitle() {
        return notificationTitle;
    }

    public String getMsgTitle() {
        return msgTitle;
    }

    public String getMsgContent() {
        return msgContent;
    }

    public Map<String, String> getExtrasParams() {
        return extrasParams;
    }

    public Platform getPlatform() {
        return platform;
    }

    public Byte getEnvironment() {
        return environment;
    }
}
